package com.qanda.tools;

import android.content.Context;
import android.telephony.TelephonyManager;

public class PhoneDataManager {
	
	Context context;
	
	public PhoneDataManager(Context ctx)
	{
		context = ctx;
	}
	
	public String getPhoneNumber()
	{  
		try
		{
		   TelephonyManager mTelephonyMgr;  
		   mTelephonyMgr = (TelephonyManager)  
		   context.getSystemService(Context.TELEPHONY_SERVICE);   
		   return mTelephonyMgr.getLine1Number();  
		}catch(Exception ex)
		{
			ex.printStackTrace();
			return "";
		}
	}  
}
